package com.hutu.erp.catalog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hutu.erp.catalog.mapper.SpecificationGroupMapper;
import com.hutu.erp.catalog.domain.SpecificationGroup;
import com.hutu.erp.catalog.service.ISpecificationGroupService;

/**
 * 商品参数组Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-24
 */
@Service
public class SpecificationGroupServiceImpl implements ISpecificationGroupService 
{
    @Autowired
    private SpecificationGroupMapper specificationGroupMapper;

    /**
     * 查询商品参数组
     * 
     * @param specificationGroupId 商品参数组ID
     * @return 商品参数组
     */
    @Override
    public SpecificationGroup selectSpecificationGroupById(Long specificationGroupId)
    {
        return specificationGroupMapper.selectSpecificationGroupById(specificationGroupId);
    }

    /**
     * 查询商品参数组列表
     * 
     * @param specificationGroup 商品参数组
     * @return 商品参数组
     */
    @Override
    public List<SpecificationGroup> selectSpecificationGroupList(SpecificationGroup specificationGroup)
    {
        return specificationGroupMapper.selectSpecificationGroupList(specificationGroup);
    }

    /**
     * 新增商品参数组
     * 
     * @param specificationGroup 商品参数组
     * @return 结果
     */
    @Override
    public int insertSpecificationGroup(SpecificationGroup specificationGroup)
    {
        return specificationGroupMapper.insertSpecificationGroup(specificationGroup);
    }

    /**
     * 修改商品参数组
     * 
     * @param specificationGroup 商品参数组
     * @return 结果
     */
    @Override
    public int updateSpecificationGroup(SpecificationGroup specificationGroup)
    {
        return specificationGroupMapper.updateSpecificationGroup(specificationGroup);
    }

    /**
     * 批量删除商品参数组
     * 
     * @param specificationGroupIds 需要删除的商品参数组ID
     * @return 结果
     */
    @Override
    public int deleteSpecificationGroupByIds(Long[] specificationGroupIds)
    {
        return specificationGroupMapper.deleteSpecificationGroupByIds(specificationGroupIds);
    }

    /**
     * 删除商品参数组信息
     * 
     * @param specificationGroupId 商品参数组ID
     * @return 结果
     */
    @Override
    public int deleteSpecificationGroupById(Long specificationGroupId)
    {
        return specificationGroupMapper.deleteSpecificationGroupById(specificationGroupId);
    }
}
